﻿<UserControl x:Class="Oddo.Concept.Crm.Client.Repository.Views.CountrySearchView"
             xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"  
             xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"  
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:viewModels="clr-namespace:Oddo.Concept.Crm.Client.Repository.ViewModels"
             xmlns:views="clr-namespace:Oddo.Concept.Crm.Common.Presentation.Views;assembly=Oddo.Concept.Crm.Common.Presentation"
             xmlns:models="clr-namespace:Oddo.Concept.Crm.Models;assembly=Oddo.Concept.Crm.Models"
             xmlns:controls="clr-namespace:Oddo.Concept.Crm.Common.Presentation.Controls;assembly=Oddo.Concept.Crm.Common.Presentation"
             xmlns:contracts="clr-namespace:Oddo.Concept.Crm.Repository.Common.Contracts;assembly=Oddo.Concept.Crm.Repository.Common"
             xmlns:dxg="clr-namespace:DevExpress.Xpf.Grid;assembly=DevExpress.Xpf.Grid.v12.2"
             xmlns:resources="clr-namespace:Oddo.Concept.Crm.Client.Repository.Resources"
             mc:Ignorable="d"
             d:DesignHeight="388"
             d:DesignWidth="937"
             d:DataContext="{d:DesignInstance viewModels:CountryViewModel}" >
    <ContentControl>
        <views:BaseView BusyCancelButtonText="{x:Static resources:labels.label_cancel}" BusyText="{x:Static resources:labels.label_busy_country}">
            <views:BaseView.SearchCriteriaContent>
                <dxlc:LayoutControl d:DataContext="{d:DesignInstance contracts:CountryFindRequest}">
                    <dxlc:LayoutItem Label="Code" MinWidth="120" MaxWidth="150">
                        <dxe:TextEdit EditValue="{Binding Path=Code, UpdateSourceTrigger=PropertyChanged}" CharacterCasing="Upper" MaxLength="3" />
                    </dxlc:LayoutItem>
                    <dxlc:LayoutItem Label="Name">
                        <dxe:TextEdit EditValue="{Binding Name, UpdateSourceTrigger=PropertyChanged}" MaxLength="200" />
                    </dxlc:LayoutItem>
                </dxlc:LayoutControl>
            </views:BaseView.SearchCriteriaContent>
            <views:BaseView.MainContent>
                <dxg:GridControl AutoPopulateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ShowBorder="False" ItemsSource="{Binding Values}">
                    <dxg:GridControl.Columns>
                        <dxg:GridColumn Header="Code" FieldName="Code"/>
                        <dxg:GridColumn Header="Name" FieldName="Name"/>
                        <dxg:GridColumn Header="Deleted" FieldName="IsDeleted"/>
                    </dxg:GridControl.Columns>
                    <dxg:GridControl.View>
                        <dxg:TableView AllowEditing="False" NavigationStyle="Row" ShowGroupPanel="False" />
                    </dxg:GridControl.View>
                </dxg:GridControl>
            </views:BaseView.MainContent>
        </views:BaseView>
    </ContentControl>
    
</UserControl>
